package com.itheima.service.impl;

import com.itheima.entity.*;
import com.itheima.mapper.ReportMapper;
import com.itheima.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {
    @Autowired
    private ReportMapper reportMapper;


    @Override
    public List<EmpGender> empGenderData() {
        return reportMapper.empGenderData();
    }

    @Override
    public EmpJob empJobData() {
        List<String> jobList=reportMapper.jobList();
        List<Integer> dataList=reportMapper.dataList();
        EmpJob empJob=new EmpJob(jobList,dataList);
        return empJob;
    }

    @Override
    public List<StudentDegree> studentDegreeData() {

        List<StudentDegree> studentDegreeList=reportMapper.studentDegreeData();
        return studentDegreeList;

    }

    @Override
    public StudentCount studentCounte() {

        List<String> clazzList=reportMapper.stdentClazzList();
        List<Integer> dataList=reportMapper.studentDataList();
        StudentCount studentCount=new StudentCount(clazzList,dataList);
        return studentCount;

    }


}